#pragma once

#include "Game/Process/RenderProcess.h"
#include "Render/Texture/Picture2DTexture.h"
#include "Render/Texture/RenderTarget.h"
#include "Render/Tradition/RHIRenderPass.h"
#include "Render/Tradition/GraphicsPipeline.h"
#include "Render/Texture/ColorRenderTarget.h"
#include "Render/Texture/DepthRenderTarget.h"
#include "Render/Shader/RHIDescriptor.h"
#include "Render/Tradition/RHIFramebuffer.h"
#include "Render/Tradition/RHICommandBuffer.h"
#include "Render/Tradition/ComputePipeline.h"
#include "Render/Texture/CustomTexture.h"
#include "Render/Texture/RHISampler.h"

class TriangleEntity;

class ComputeProcess : public RenderProcess
{
	DECLARE_PROCESS(ComputeProcess)


protected:

	virtual void OnInit() override;

	virtual void OnTick(float deltaTime) override;

	virtual void OnResize() override;

protected:

	RefCountPtr<RHICommandBuffer> mCommandBuffer;

	RefCountPtr<RHITexture> mLeftTexture;

	RefCountPtr<RHITexture> mRightTexture;

	RefCountPtr<RHISemaphore> mWaitGraphicsSemaphore;

	RefCountPtr<RHISemaphore> mSignalComputeSemaphore;





	RefCountPtr<RHIDescriptor> mEdgeDetectDescriptor;

	RefCountPtr<ComputePipeline> mEdgeDetectPipeline;

	DescriptorMask mEdgeDetectDescriptorMask;



	RefCountPtr<RHIDescriptor> mEmbossDescriptor;

	RefCountPtr<ComputePipeline> mEmbossPipeline;

	DescriptorMask mEmbossDescriptorMask;




	RefCountPtr<RHIDescriptor> mSharpenDescriptor;

	RefCountPtr<ComputePipeline> mSharpenPipeline;

	DescriptorMask mSharpenDescriptorMask;



public:

	int32 mPipelineIndex;
};
